Skip to content

Conversation

@Alexander-Cairns
Copy link
Contributor

@Alexander-Cairns Alexander-Cairns commented Aug 20, 2025

Summary by CodeRabbit

  • New Features
    • Added a configurable environment variable to control concurrent workers for media processing services (Homarus, Houdini, OCR).
    • Allows easy tuning of processing throughput per deployment without code changes; default concurrency is 1.

@Alexander-Cairns Alexander-Cairns added the minor Added functionality that is backwards compatible. label Aug 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 20, 2025

Walkthrough

A new Docker environment variable CONCURRENT_CONSUMERS (default "1") was introduced. The Java startup command now forwards this value to three system properties controlling concurrency: derivative.homarus.concurrent-consumers, derivative.houdini.concurrent-consumers, and derivative.ocr.concurrent-consumers.

Changes

Cohort / File(s) Summary
Docker runtime config
Dockerfile
Add ENV CONCURRENT_CONSUMERS="1". Update Java CMD/ENTRYPOINT to pass -Dderivative.{homarus,houdini,ocr}.concurrent-consumers=${CONCURRENT_CONSUMERS}.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as Operator
  participant D as Docker Runtime
  participant C as Container Env
  participant J as Java Process
  participant S1 as Homarus
  participant S2 as Houdini
  participant S3 as OCR

  U->>D: Set CONCURRENT_CONSUMERS (optional)
  D->>C: Start container with env
  C->>J: Launch with -Dderivative.*.concurrent-consumers=${CONCURRENT_CONSUMERS}
  J->>S1: Initialize with concurrent-consumers
  J->>S2: Initialize with concurrent-consumers
  J->>S3: Initialize with concurrent-consumers
  note over S1,S3: Each service uses provided concurrency value
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I tuned my pods with a twitch of my nose,
One env var set—concurrency grows.
Homarus, Houdini, OCR in line,
Hops per queue now neatly align.
In the Docker burrow, I nudge and I nibble—
Threads multiply with a happy little scribble. 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sup-7157

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
Dockerfile (1)

31-33: Add a safe default in case CONCURRENT_CONSUMERS is unset/empty

Shell parameter expansion guards against accidental empty values (e.g., overridden as empty in Compose/K8s).

Apply this diff:

-    -Dderivative.homarus.concurrent-consumers=${CONCURRENT_CONSUMERS} \
-    -Dderivative.houdini.concurrent-consumers=${CONCURRENT_CONSUMERS} \
-    -Dderivative.ocr.concurrent-consumers=${CONCURRENT_CONSUMERS} \
+    -Dderivative.homarus.concurrent-consumers=${CONCURRENT_CONSUMERS:-1} \
+    -Dderivative.houdini.concurrent-consumers=${CONCURRENT_CONSUMERS:-1} \
+    -Dderivative.ocr.concurrent-consumers=${CONCURRENT_CONSUMERS:-1} \
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 72ce7bc and 337fc59.

📒 Files selected for processing (1)
  • Dockerfile (2 hunks)
🔇 Additional comments (2)
Dockerfile (2)

12-12: ENV for concurrent consumers — LGTM

Good addition. Defaulting to 1 keeps current behavior backward-compatible.


26-37: Verify derivative concurrency properties and resource recommendations

  • Confirm that Alpaca 2.2.0 recognizes per-service concurrency keys—likely derivative.homarus.concurrent-consumers, derivative.houdini.concurrent-consumers, and derivative.ocr.concurrent-consumers—by inspecting the example.properties or application.properties bundled with the 2.2.0 release.
  • Document expected memory/CPU impact:
    • Start with 1–2 consumers per service.
    • Allocate approximately 512 MB of heap per consumer (e.g., -Xmx512m × N).
    • Don’t exceed one consumer per logical CPU core.
  • Monitor broker-side and JVM metrics (ActiveMQ listener limits, GC pauses, CPU load) as you scale concurrency.
  • Add these sizing guidelines and verification steps to your deployment docs or alpaca.properties reference.

@adamcbowman adamcbowman merged commit 7adeb68 into main Aug 22, 2025
5 checks passed
@adamcbowman adamcbowman deleted the sup-7157 branch August 22, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Added functionality that is backwards compatible.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants